#!/usr/bin/env python3

import rospy
from DrRobotController_six_axes_can.msg import gravity_compensation
# import DrRobotController_six_axes as dr

def callback(data):
    import DrRobotController_six_axes as dr
    dr.gravity_compensation(id_num=data.id_num, pay_load=data.pay_load)
    rospy.loginfo("gravity_compensation_node")


def listener():
    rospy.init_node("gravity_compensation", anonymous=True)
    rospy.Subscriber("gravity_compensation", gravity_compensation, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

